<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Backtest of VaR Estimation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../R.css">
</head><body>

<table width="100%" summary="page for VaR.backtest {VaR}"><tr><td>VaR.backtest {VaR}</td><td align="right">R Documentation</td></tr></table>
<h2>Backtest of VaR Estimation</h2>


<h3>Description</h3>

<p>
Test for given proportions on input data respective a given VaR.
</p>


<h3>Usage</h3>

<pre>
VaR.backtest(x, VaR, p)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
Numerical vector of observation.</td></tr>
<tr valign="top"><td><code>VaR</code></td>
<td>
Number or numerical vector of the same length as <code>x</code>.</td></tr>
<tr valign="top"><td><code>p</code></td>
<td>
Confidence level of VaR estimation.</td></tr>
</table>

<h3>Details</h3>

<p>
This function performs the test for equal or given proportion (prop.test) on
input data. It calculates a part of observation exceeding a VaR and compares it
with a confidence level of VaR estimation.
</p>


<h3>Value</h3>

<p>
Return value is a p.value of prop.test and can be interpretated in a usual
manner.</p>

<h3>Author(s)</h3>

<p>
T. Daniyarov
</p>


<h3>See Also</h3>

<p>
<code><a href="../../stats/html/prop.test.html">prop.test</a></code>
</p>


<h3>Examples</h3>

<pre>
data(exchange.rates)
attach(exchange.rates)
y &lt;- USDJPY[!is.na(USDJPY)]
z &lt;- VaR.norm(y)
VaR.backtest(z$cdata, z$VaR, p = 0.01)
detach(exchange.rates)
</pre>



<hr><div align="center">[Package <em>VaR</em> version 0.2 <a href="00Index.html">Index</a>]</div>

</body></html>
